package com.china08.yxyapi.repository.db.lectureresult;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import com.china08.yxyapi.entity.db.huodong.lecture.YxyHuodongResResultTea;

public interface YxyHuodongResResultTeaRepository extends JpaRepository<YxyHuodongResResultTea, String> {

    YxyHuodongResResultTea findByTeaIdAndSchoolId(String uId, String sId);

    Page<YxyHuodongResResultTea> findByAreaIdDistrict(String areaIdDistrict, Pageable pageable);

    Page<YxyHuodongResResultTea> findByAreaIdDistrictAndTeaNameContaining(String areaIdDistrict, String teaName,
            Pageable pageable);

    @Modifying
    @Transactional
    Integer deleteByAreaIdDistrict(String areaIdDistrict);

}
